<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsps/tag.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="static/styles/SystemStyle.css" rel="stylesheet" type="text/css"/>

<title>welcom</title>
<%@ include file="/WEB-INF/jsps/common_css.jsp"%>
<%@ include file="/WEB-INF/jsps/common_js.jsp"%>

<script type="text/javascript">
	//格式化时间显示格式
	//时间格式化
	function dateFormatter(timem){
		return new Date(timem).format('yyyy年-MM月-dd日');
	}


	function testAddSubPage(title,url){
        var jq = top.jQuery;
        if (jq("#tabs").tabs('exists', title)){
            jq("#tabs").tabs('select', title);
        } else {
              var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
               jq("#tabs").tabs('add',{
                                  title:title,
                                  content:content,
                                  closable:true,
                                  iconCls:'icon-application_form_edit'
                                });
         }
    }

	//查看待办列表
	function findListByNextFoot(nextFoot){
		var title = 0;
		var url = "";
		if(nextFoot==2){
			title = "安全检查列表";
			url = "${baseurl}case/safetyCheckStatusListUI?nextFoot="+nextFoot;
		}else if(nextFoot==3){
			title = "信息采集列表";
			url =  "${baseurl}case/infoCollectListUI?nextFoot="+nextFoot;
		}else if(nextFoot == 4){
			title = "活动记录列表";
			url =  "${baseurl}case/activityRecordsListUI?nextFoot="+nextFoot;
		}else if(nextFoot == 5){
			title = "突发事件报警情况列表";
			url =  "${baseurl}case/suddenThingCallPoliceStatusListUI?nextFoot="+nextFoot;
		}else if(nextFoot == 6){
			title = "离开办案区列表";
			url =  "${baseurl}case/leaveCaseAreaiListUI?nextFoot="+nextFoot;
		}

		testAddSubPage(title,url);
	}
</script>
</head>
<body>

<!-- 门户 -->
<div id="pp" style="position:relative;margin-top: 2px;">

	<div style="width:20%;">
		<div title="天气" closable="true" data-options="" style="text-align:center;height:300px;padding:5px;background:#fafafa;">
			<div class="easyui-panel"  style="background:#fafafa;"
			        data-options="closable:true,fit:true,border:false">

                        <!--天气预报 start-->
                        <div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 10px; WIDTH: 95%; HEIGHT: 180px; border: 1px solid #cacaca; background: #FFFFFF">
                            <div style="WIDTH: 100%; clear: both; height: 31px; background-image: url(http://www.tianqi.com/static/images/code/bg_13.jpg); background-repeat: repeat-x; border-bottom: 1px solid #cacaca;">
                            <div style="float: left; height: 31px; color: #9e0905; font-weight: bold; line-height: 31px; margin-left: 20px; font-size: 14px;">城市天气预报</div>
                        </div>
                        <iframe width="400" scrolling="no" height="120" frameborder="0" allowtransparency="true" src="http://i.tianqi.com/index.php?c=code&id=19&bgc=%23FFFFFF&bdc=%23&icon=1&temp=1&num=2"></iframe>
                        </div>
                        <!--天气预报 end-->
			</div>
	    </div>
	</div>


	<div style="width:20%;">
		<div id="pgrid" title="日历" closable="true" style="text-align:center;height:300px;padding:5px;background:#fafafa;">
			<div id="activityRecordsPortal" class="easyui-panel"  style="background:#fafafa;"
			        data-options="closable:true,fit:true,border:false">

				<div id="cc" class="easyui-calendar" style="width:300px;height:240px;"></div>

			</div>
		</div>
	</div>


	<div  style="width:20%;">
		 <div title="指数"  closable="true" style="text-align:center;height:300px;padding:5px;background:#fafafa;">
		 	<div id="leaveCaseAreaPortal" class="easyui-panel"  style="background:#fafafa;"
			        data-options="closable:true,fit:true,border:false">

				<div style=" width:400px; height:10px">
						<span id="showtime"></span>
				</div>

				<div id="nextRecomment" style="margin-top: 30px;font-size: 16px"></div>
				<div id="lastOpenNumberRecomment" style="font-size: 16px"></div>
				<div id="lastOpenNumber" style="font-size: 16px"></div>

			</div>
	    </div>
	</div>
</div>


</body>
<script type="text/javascript">


    function showTime(){
        var week=new Array('星期一','星期二','星期三','星期四','星期五','星期六','星期日');
        var now = new Date();
        var year = now.getFullYear();
        var month = now.getMonth();
        var date = now.getDate();
        var day = now.getDay();
        var hour = now.getHours();
        var minutes = now.getMinutes();
        var second = now.getSeconds();
        month<10?month='0'+month:month;
        month=month+1;
        hour<10?hour='0'+hour:hour;
        minutes<10?minutes='0'+minutes:minutes;
        second<10?second='0'+second:second;
        var now_time = '当前时间：' + year + '年' + month + '月' + date + '日' + ' ' + hour + ':' + minutes + ':' + '' + second + ' ' + week[day - 1];
        document.getElementById('showtime').innerHTML=now_time;
        setTimeout("showTime();",1000);      //每隔1秒刷新一次
    }

    showTime();


$(function(){

	$('#pp').portal({
		border:false,
		fit:true
	});

	$('#pp2').portal({
		border:false,
		fit:true
	});


	//更新上期开奖
    $.get("${baseurl}doubleball/lastOpenNumber?t="+new Date().getTime(),function(data){
        data=eval('('+data+')');
        $("#lastOpenNumber").html(data.content);
    });

    //获取上期推荐开奖号码
    $.get("${baseurl}doubleball/lastOpenNumberRecomment?t="+new Date().getTime(),function(data){
        data=eval('('+data+')');
        $("#lastOpenNumberRecomment").html(data.content);
    });

    //获取接下来最近一期推荐开奖号码
    $.get("${baseurl}doubleball/nextRecomment?t="+new Date().getTime(),function(data){
        data=eval('('+data+')');
        $("#nextRecomment").html(data.content);
    });




    //获取第二步:安全检查情况待办列表
	<%--$.post("${baseurl}case/allCaseBase", {nextFoot:2,dateTime:new Date().getTime()},--%>
			   <%--function(data){--%>
				 <%--data = JSON.parse(data);--%>
				 <%--var temp = "";--%>
			     <%--if(data && data.length>0){--%>
			    	 <%--var dataLength = 0;--%>
			    	 <%--if(data.length >10){--%>
			    		 <%--dataLength = 10;--%>
			    	 <%--}else{--%>
			    		 <%--dataLength = data.length;--%>
			    	 <%--}--%>

			    	 <%--for(var i=0;i<dataLength;i++){--%>
			    		 <%--temp +="<p>"+data[i].id+" : "+dateFormatter(data[i].inCaseDate)+" "+data[i].suspectName+"</p>";--%>
			    	 <%--}--%>
			    	 <%--temp += '<div align="right" class="clickClass" onclick="findListByNextFoot(2)"  style="color: blue;font-weight: bold;">___ 点击查看列表</div>';--%>
			     <%--}else{--%>
			    	 <%--temp = "<font color=red>暂无待处理案件<font>";--%>
			     <%--}--%>

			     <%--$("#safetyCheckStatusPortal").prepend(temp);--%>
			   <%--});--%>

});




</script>
</html>